//
//  HMUILabel.m
//  HeartMark
//
//  Created by rimi on 16/11/7.
//  Copyright © 2016年 黄华强. All rights reserved.
//

#import "HMUILabel.h"

@implementation HMUILabel

- (instancetype)initWithTitle:(NSString *)title Color:(UIColor *)color FontSize:(CGFloat)fontSzie LayoutWidth:(CGFloat)layoutWidth
{
    self = [super init];
    if (self) {
        self.text = title;
        self.textColor = color;
        self.font = [UIFont systemFontOfSize:fontSzie];
        self.numberOfLines = 0;
        if (layoutWidth > 0) {
            //指定多行文本的换行高度
            self.preferredMaxLayoutWidth = layoutWidth;
            self.textAlignment = NSTextAlignmentLeft;
        }
        [self sizeToFit];
    }
    return self;
}

@end
